using UnityEngine;

public class Keyboard : MonoBehaviour
{
	private Player player;

	private void Start()
	{
		Object.Destroy(this);
		player = Library.player;
	}

	private void Update()
	{
		if (!Info.pause)
		{
			
			player.Move(new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical")).normalized);
			if (Input.GetKeyDown(KeyCode.Q))
			{
				player.ActiveAbility(0);
			}
			if (Input.GetKeyDown(KeyCode.Alpha2))
			{
				player.ActiveAbility(1);
			}
			if (Input.GetKeyDown(KeyCode.E))
			{
				player.ActiveAbility(2);
			}
			if (Input.GetKeyDown(KeyCode.R))
			{
				player.ActiveAbility(3);
			}
			if (Input.GetButtonDown("A"))
			{
				player.ActiveAbility(0);
			}
			if (Input.GetButtonDown("X"))
			{
				player.ActiveAbility(1);
			}
			if (Input.GetButtonDown("Y"))
			{
				player.ActiveAbility(2);
			}
			if (Input.GetButtonDown("B"))
			{
				player.ActiveAbility(3);
			}
		}
	}
}
